package com.evil.application.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.evil.application.pojo.dto.view.config.filter.CopyFilterReqDTO;
import com.evil.application.pojo.dto.view.config.filter.FilterGroupDTO;
import com.evil.application.pojo.dto.view.config.filter.FilterSourceDTO;
import com.evil.application.pojo.dto.view.config.filter.ModifyFilterReqDTO;
import com.evil.application.pojo.dto.view.config.filter.query.FilterGroupQueryReqDTO;
import com.evil.application.pojo.entity.ApplicationFilterGroup;
import com.evil.common.application.dto.judge.JudgeOr;
import org.springframework.validation.annotation.Validated;

import java.util.List;

/**
 * 应用筛选组表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface ApplicationFilterGroupService extends IService<ApplicationFilterGroup> {


    /**
     * 保存应用筛选
     *
     * @param modifyFilterReqDTO modifyFilterReqDTO
     */
    void saveFilter(@Validated ModifyFilterReqDTO modifyFilterReqDTO);

    /**
     * 复制应用筛选
     *
     * @param copyFilterReqDTO copyFilterReqDTO
     */
    void copyFilter(CopyFilterReqDTO copyFilterReqDTO);

    /**
     * 删除应用筛选
     *
     * @param filterSourceDTO filterSourceDTO
     */
    void deleteBySource(FilterSourceDTO filterSourceDTO);

    /**
     * 获取应用筛选数据
     *
     * @param filterSourceDTO filterSourceDTO
     * @return List
     */
    List<FilterGroupDTO> findBySource(FilterSourceDTO filterSourceDTO);

    /**
     * 转换筛选
     *
     * @param reportingKey reportingKey
     * @param filterQuery  filterQuery
     * @return List
     */
    List<JudgeOr> transformFilterQuery(String reportingKey, List<FilterGroupQueryReqDTO> filterQuery);

}
